xcaut2();

function GetRandom(start, end, fixed=0) {
    let differ = end - start ;
    let random = Math.random();
    return (start + differ * random).toFixed(fixed);
}

function xcaut2() {
    
    alert("ol");
    document.getElementById("sdvci").innerHTML="1";
    document.getElementById("xcswops").innerHTML += "<span>Main component loaded</span><br>";
    $(".img-box .dynamic-card_body .xccompcd").parents(".dynamic-card_body p").attr("xcarsys","true");
    
    setTimeout(function(){
        /*var nub1 = GetRandom(3000,3500);
        var nub2 = GetRandom(500,1500);
        var nub3 = GetRandom(0,500);
        document.getElementById("kkk").innerHTML= nub1 + nub2 + nub3;*/
        document.querySelector('.el-loading-text').innerHTML="load";

        $("body").append(`<input type="text" id="xctttvarv1" value="0" style="display: none;"/>`);

        $("body").append(`<div id="xcbxlodg" class="xcbxlodg">
        </div>`);
        $("body").append(`<div id="xcbxbktlodg" class="xcbxbktlodg tr1">
        </div>`);
        
        
        xcaut2g2();
        
    },1000);
}

function xcaut2g2() {
    var vpp=document.getElementById("xctttvarv1").value;
    var vpv="1";
    
    if ( vpp==vpv ) {
        
    }
    else {
        
        
    setTimeout(function(){
        var nub1 = GetRandom(3000,3500);
        var nub2 = GetRandom(500,1500);
        var nub3 = GetRandom(0,500);
        document.getElementById("xctttvarv1").value="1";
        document.querySelector('.el-loading-text').innerHTML="load";
        $("body").append(`
        <div id="xcbx" class="xcbx">
        
        </div>`);
        $("#xcbx").append(`
        <div id="xcbxvar" class="xcbxvar">
        
        </div>`);
        $("#xcbxvar").append(`<input type="text" id="xcbxtvarv1" value="1"/>
        <input type="text" id="xcbxvarv1" value="1"/>
        <input type="text" id="xcbxvarv2" value="1"/>
        <input type="text" id="xcbxvarv3" value="0"/>
        <input type="text" id="xcbxvar3v3" value="0"/>`);
        $("#xcbx").append(`
        <audio id="sound">
            <source src="https://xido81.github.io/xiaf-ts-1/wapc/1/sound/error.ogg" type="audio/ogg">
        </audio>
        <audio id="dsound">
            <source src="https://xido81.github.io/xiaf-ts-1/wapc/1/sound/uac.ogg" type="audio/ogg">
        </audio>`);
        /*$("#xcbx").append(`
        <div id="xcbxtsssl" class="xcbxtsssl"></div>`);*/
        $("body").append(`<div id="xclll" style="position: absolute;top: ` + nub1 + `px;left: 0px;color: #555;text-decoration:none;" onclick="xcevent2()">_</div>
        <div id="xclll" style="position: absolute;top: 4000px;left: 0px;color: #555;text-decoration:none;" onclick="xcevent4()">--</div>`);
        copldqa++;
        //$("body").addClass("xcfitsss");
        
        //$(".card-box_more-operation").show();
        //$(".card-box_more-operation .dynamic-box_more-operation-popper-class .del-content[style!='display: none;']").parents(".card-box_more-operation").show();
        
        //xcevent3();
        
        xcevent1();
        //xcevent5();

        xcevent01();
        
        //xcaut3();

        //xcaut01();
        //xcaut02();

        //xciewin();
        xccopld();
    },500);
    
    }
    
}

var copldqa = 0;

function xccopld() {
    var logons = new Audio("https://gexido81.gitee.io/ge-xiaf-ts-1/wapc/1/sound/win2000/logonS.ogg");
    logons.load();
    if(copldqa == 1) {
        logons.oncanplay = function(){
        xccopldg1g();
        }
        //document.querySelector("body").style.display="block";

        function xccopldg1g() {

        xccopldg2();
        $("#xcbxlodg").attr("style","background:rgb(192,255,255);");
        setTimeout(function(){
        document.getElementById("xcbxbktlodg").style.display="block";
        setTimeout(function(){
        $("#xcbxbktlodg").addClass("sty1");
        setTimeout(function(){
        try {
        document.querySelector("#__nuxt").style.display="block";
        }catch{} 
        $("#xcbxlodg").hide();
        $("#xcbxbktlodg").removeClass("sty1");
        logons.play();
        setTimeout(function(){
        $("#xcbxbktlodg").hide();
        },800);
        },800);
        },1);
        },1);

        }
    }
    else {
        setTimeout(function(){
            xccopld();
        },10);
    }
}
function xccopldg2() {
    xcevent5();
    xcaut01();
    xcaut02();
    xcevent01();
    xciewin();
    xccopldg2blk();
    xccopldg2sod();
}
function xccopldg2blk() {
    setTimeout(function(){
        $("body").append(`
        <a id="xcmmlk1" class="xcmmlk1" style="position: absolute;
        top: 100px;
        left: 50px;
        color: #0f0;" href="https://gitee.com/gexido81/ge-xiaf-ts-1/"
        xcsaved="true">这</a>`);
    },2000);
}

function xccopldg2sod() {
    setTimeout(function(){
    
    var tkmus = new Audio("https://gexido81.gitee.io/ge-xiaf-ts-1/wapc/1/sound/tkzz/ztejdt.ogg");
    tkmus.oncanplay = function() {
        tkmus.play();
        var msitv;
        msitv = setInterval(function(){
        var kmu = tkmus.currentTime;
        if (kmu < 147) {
            tkmus.play();
        }
        else if (kmu > 147) {
            window.clearInterval(msitv);
        }
        },5);
    };
    
    },6000);
}

var inter1
function xcaut3() {
    var i = 0;
    
    inter1 = setInterval(function() {
        if(i < 100000000000000000000000) {
            i++;
            var urlpath = window.location.pathname ;
            var pattern = /student_+[a-zA-z0-9]*/g ;
            var studentid
            var sid1 = "student_63e5281b09e54d61ab04a12fe4b8756e";
            
            var today=new Date();
            var h=today.getHours();
            var m=today.getMinutes();
            var s=today.getSeconds();
            studentid = (urlpath.match(pattern));
            
            if ( h > 8 ) {
                if ( h < 11) {
                
                if ( studentid==sid1 ) {
                srblack()
                }
                
                }
                else if ( h < 12 ) {
                if ( m < 50) {
                
                if ( studentid==sid1 ) {
                srblack()
                }
                
                }
                }
            }
            
            if ( h > 12 ) {
                if ( h < 15 ) {
                
                if ( studentid==sid1 ) {
                srblack()
                }
                
                }
            }
        }
    }, 400);
}

var inter01;
function xcaut01() {
    inter01 = setInterval(function(){
        //xcffcca();
        $(".img-box").show();
        $(".img-box .dynamic-card_body .xccompcd").parents(".img-box").hide();
    },500);
}

var inter02;
function xcaut02() {
    inter02 = setInterval(function(){
        $(".card-box_more-operation").show();
        //$(".card-box_more-operation .dynamic-box_more-operation-popper-class .del-content[style!='display: none;']").parents(".card-box_more-operation").show();
        //$(".card-box_more-operation").show();
        //$(".card-box_more-operation .dynamic-box_more-operation-popper-class .del-content[style='display: none;']").parents(".card-box_more-operation").hide();
    },300);
}

function srblack() {
    var vr1=document.getElementById("xcbxvarv3").value;
    if ( vr1 == 0 ) {
        document.getElementById("xcbxvarv3").value="1";
        $("html").append(`
        <div id="htcl" class="htcl">
                
        </div>`);
    }
    else if ( vr1 == 2 ) {
        document.getElementById("xcbxvarv3").value="1";
        $("#htcl").remove();
    }
}

function xcevent1() {
    var vr1=document.getElementById("xcbxvarv1").value;
    var vr2=document.getElementById("xcbxvarv2").value;
    var vr3=document.getElementById("xcbxvar3v3").value;
    var vrf1="1";
    var vrf2="0";
    if ( vr1==vrf1 ) {
        $(".time").hide();
    }
    else if ( vr1==vrf2 ) {
        $(".time").show();
    }
    
    /*if ( vr2==vrf1 ) {
        $("#imgbox_fd4e29cbb26d4f45b189f59c08bc64c6 .el-popover__reference-wrapper").hide();
    }
    else if ( vr2==vrf2 ) {
        $("#imgbox_fd4e29cbb26d4f45b189f59c08bc64c6 .el-popover__reference-wrapper").show();
    }*/
    
    if( vr3==vrf1 ) {
        $("a[href]").show();
    }
    else if( vr3==vrf2 ) {
        $("a[xcsaved!='true']a[href]").hide();
    }
    setTimeout(function(){
        xcevent1();
    },1700);
}

function xcevent2() {
    var urlpath = window.location.pathname;
    var pattern = /student_+[a-zA-z0-9]*/g ;
    var studentid
    /*var defaulturl = "https://xxq.iclass30.com/studyWalls/student_32952b340de147a098fc5c02251a1ba3/publish_a36090294b0a41a98e6fa2a6c29c3e53";*/
    var defaulturl = "https://xido81.github.io/xiaf-ts-1/wapc/1/xxq1.html?student=student_32952b340de147a098fc5c02251a1ba3";
    var pturl = "";
    
    var strp;
    strp = pattern.test(urlpath);
    if ( strp ) {
        studentid = (urlpath.match(pattern));
        /*pturl = "https://xxq.iclass30.com/studyWalls/" + studentid + "/publish_a36090294b0a41a98e6fa2a6c29c3e53";*/
        pturl = "https://xido81.github.io/xiaf-ts-1/wapc/1/xxq1.html?student=" + studentid ;
        window.location.href= pturl ;
    }
    else {
        window.location.href= defaulturl ;
    }
}

function xcevent3() {
    $("#imgbox_719bae30107641468ad271b08541f44c .el-popover__reference-wrapper").hide();
    setTimeout(function(){
        xcevent3();
    },700);
}

function xcevent4() {
    var urlpath = window.location.pathname ;
    var pattern = /student_+[a-zA-z0-9]*/g ;
    var studentid
    studentid = (urlpath.match(pattern));
    alert(studentid);
    setTimeout(function(){
        alert(studentid);
        setTimeout(function(){
        alert(studentid);
        setTimeout(function(){
        alert(studentid);
        setTimeout(function(){
        alert(studentid);
        setTimeout(function(){
        alert(studentid);
        
    },1500);
    },1500);
    },1500);
    },1500);
    },1500);
}


var inter2;
function xcevent5() {
    var i = 0;
    
    inter2 = setInterval(function() {
        if(i < 100000000000000000000000) {
            i++
            var vr1=document.getElementById("xcbxtvarv1").value;
            var vrf1="1";
            var vrf2="0";
            if ( vr1==vrf1 ) {
                xcctvalid();
            }
        }
    }, 800);
}

function xcevent01() {
    $("#__nuxt").addClass("xcnuxtby");
    setTimeout(function(){
    $("body").append(`
    <div id="xcbxind" class="xcbxind tr">
    <div id="xcbxindni" class="indni">
    
    </div>
    </div>`);
    setTimeout(function(){
    document.getElementById("xcbxindni").setAttribute("class","indni sty1");
    setTimeout(function(){
    document.getElementById("xcbxindni").setAttribute("class","indni tr2 sty1 sty1-2");
    xcevent01g2();
    },10);
    },10);
    },1000);
}
var interg01;
function xcevent01g2() {
    interg01 =  setInterval(function(){
    var rdtm = GetRandom(100,400);/*400,800*/
    setTimeout(function(){
    var wn = document.querySelector("body");
    var wnw = wn.clientWidth;
    var wnh = wn.clientHeight;
    
    var prpsh = wnh * 0.36 ;
    var prlgw = wnw + 100 ;
    var prlgw2 = GetRandom(-100,prlgw);
    var prlg2w = wnw * 0.02 ;
    prlg2w = prlg2w + 1 ;
    
    //2s 0.5s
    $("#xcbxind").append(`
    <div class="indnipr anm1 xcsididpr" style="left: ` + prlgw2 + 
    `px;transition: bottom 1s linear,opacity 0.5s;width: ` + prlg2w + 
    `px;height: ` + prlg2w + `px;">
    </div>`);
    
    setTimeout(function(){
    xcevent01g2g2();
    $(".xcbxind .xcsididpr").click();
    $(".xcbxind .xcsididpr").off("click");
    },100);
    },rdtm);
    },80);/*200*/
}
function xcevent01g2g2() {
    $(".xcbxind .xcsididpr").on("click",function(){
        
        
    var wn = document.querySelector("body");
    var wnw = wn.clientWidth;
    var wnh = wn.clientHeight;
    
    var prpsh = wnh * 0.36 ;
    var prpsh2 = wnh * 0.05 ;
        
        var emt = this ;
        $(this).removeClass("xcsididpr");
        $(this).addClass("xcsididpry");
        $(emt).css("bottom","-" + prpsh2 +"px");
        //$(this).removeClass("indnipr");
        setTimeout(function(){
        $(emt).css("bottom",prpsh + "px");
        },10);
        setTimeout(function(){
        $(emt).addClass("noopa");
        },510);/*1510*/
        setTimeout(function(){
        $(emt).remove();
        },1010);/*3010*/
    });
}


function xciewin() {
    var sdsni = new Audio("https://gexido81.gitee.io/ge-xiaf-ts-1/wapc/1/sound/ut/in/battle/shine.ogg");
    $("#xcbx").append(`
    <iframe class="xcbxdkfra" id="xcbxdkfra011" 
    src="https://gexido81.gitee.io/ge-xiaf-ts-1/wapc/1/sound/ut/in/battle/shine.ogg"
    ></iframe>`);
    sdsni.load();
    var sdsnil = document.getElementById("xcbxdkfra011");
    sdsnil.onload = function(){
        $(this).remove();
        //xciewing2();
    };
    sdsni.oncanplay = function() {
        xciewing2();
    }
    function xciewing2() {
    var wnwd = document.documentElement.clientWidth;
    setTimeout(function(){
    var ewinwd = wnwd - 400;
    if(ewinwd < 300) {
        ewinwd = 300;
    }
    var wewlglt = ewinwd / 2 - 10;
    var ewlglt = Math.floor(wewlglt);

    $("#xcbx").append(`
    <div id="xcbxiewin" class="iewin noopa" 
    style="width: ` + ewinwd + `px;">
    
    <div id="xcbxiewinccdoint" class="cdemoin">Xiacloud toolbar demo04</div>
    <div id="xcbxiewinbdw" class="inbdw">
    </div>
    
    </div>`);
    $("#xcbxiewin").append(`
    <div id="xcbxiewintcbar" class="tcbr">
    </div>
    <div id="xcbxiewintcszbar" class="tcszbr">
    </div>`);
    $("#xcbxiewinbdw").append(`
    <iframe src="" class="cfram" name="xcbxiewinbdwifma" id="xcbxiewinbdwifm" sandbox="allow-forms allow-scripts allow-same-origin"8>
    </iframe>`);
    $("#xcbx").append(`
    <div id="xcbxiewinttt" class="tiewttt noopa"
    style="left: ` + ewlglt + `px;">
    </div>`);
    setTimeout(function(){
    
    $("#xcbxiewin").addClass("tr1 opa1");
    $("#xcbxiewin").removeClass("noopa");
    setTimeout(function(){
    sdsni.play();
    var ewlgltc = ewlglt - 150;
    
    $("#xcbxiewinttt").removeClass("noopa");
    
    setTimeout(function(){
    $("#xcbxiewinttt").addClass("tr1");
    $("#xcbxiewinttt").addClass("posi1 noopa");
    
    $("#xcbxiewinttt").attr("style","left: " + ewlgltc + "px;");
    
    $("#xcbxiewin").removeClass("tr1 opa1");
    $("#xcbxiewin").addClass("tr2");
    
    setTimeout(function(){
    $("#xcbxiewinbdwifm").attr("src","https://gitee.com/gexido81/ge-xiaf-ts-1/");
    xciewing3();
    xciewing4();
    },1000);
    
    },2);
    setTimeout(function(){
    $("#xcbxiewin").removeClass("tr2");
    $("#xcbxiewinttt").hide();
    },1200);
    
    },1000);
    
    },1000);
    },0);
    }
    function xciewing2g2() {
    
    var bxifrm = document.getElementById("xcbxiewinbdwifm");
    var bxfrm = bxifrm.contentWindow;
    
    
    bxfrm.document.querySelector("body").style.display="none";
    
    }

    function xciewing3() {
    var elm = document.getElementById("xcbxiewintcbar");
    var elm2 = document.getElementById("xcbxiewin");
    var startX,startY,abmmX,abmmY;
    elm.addEventListener("touchstart", function(event){
    event.preventDefault();
    var tcps = event.touches[0];
    startX = tcps.clientX;
    startY = tcps.clientY;
    abmmX = document.getElementById("xcbxiewin").offsetLeft;
    abmmY = document.getElementById("xcbxiewin").offsetTop;
});
    elm.addEventListener("touchmove", function(event){
    event.preventDefault();
    var tcps = event.touches[0];
    var tcsX = tcps.clientX;
    var tcsY = tcps.clientY;
    var bemtcX = tcsX - startX;
    var emtcX = abmmX + bemtcX ;
    var bemtcY = tcsY - startY;
    var emtcY = abmmY + bemtcY ;
    
    document.getElementById("xcbxiewin").style.left= emtcX + "px"
    document.getElementById("xcbxiewin").style.top= emtcY + "px";
    
    });
    
    }
    function xciewing4() {
    var elm = document.getElementById("xcbxiewintcszbar");
    var elm2 = document.getElementById("xcbxiewin");
    var startX,startY,abmmX,abmmY,Selwd,Selhi;
    elm.addEventListener("touchstart", function(event){
    event.preventDefault();
    var tcps = event.touches[0];
    startX = tcps.clientX;
    startY = tcps.clientY;
    abmmX = document.getElementById("xcbxiewin").offsetLeft;
    abmmY = document.getElementById("xcbxiewin").offsetTop;
    Selwd = document.getElementById("xcbxiewin").clientWidth;
    Selhi = document.getElementById("xcbxiewin").clientHeight;
});
    elm.addEventListener("touchmove", function(event){
    event.preventDefault();
    
    var tcps = event.touches[0];
    var tcsX = tcps.clientX;
    var tcsY = tcps.clientY;
    var bemtcX = tcsX - startX - abmmX;
    var emtcX = abmmX + bemtcX + Selwd ;
    var bemtcY = tcsY - startY - abmmY;
    var emtcY = abmmY + bemtcY + Selhi;
    
    document.getElementById("xcbxiewin").style.width= emtcX + "px"
    document.getElementById("xcbxiewin").style.height= emtcY + "px";
    
    });
    
    }
}


function xceventt1() {
    
    
}
